﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Common;
using System.Data;

namespace mfe.bll
{
    public partial class ItemTag
    {
        public override string ToString()
        {
            return _TagName;
        }

        public static bool DeleteItemTags(string itemGuidID)
        {
            try
            {
                mfe.lib.data.Database db = mfe.lib.data.DatabaseFactory.CreateDatabase();
                DbCommand cmd = db.GetSqlStringCommand("delete from ItemTag where ItemGuidID=@ItemGuidID");
                db.AddInParameter(cmd, "ItemGuidID", DbType.String, itemGuidID);
                db.ExecuteNonQuery(cmd);
                return true;
            }
            catch (Exception ex)
            {
                mfe.lib.Logger.Log(ex);
                return false;
            }
        }
    }
}
